<!DOCTYPE html>
<!--[if lt IE 7]>      <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]>         <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]>         <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title></title>
		<#assign base=request.contextPath />
    <link rel="stylesheet" type="text/css" href="${base}/css/cloud.css"/>
    <link rel="stylesheet" href="${base}/frame/layui/css/layui.css">
    <script type="text/javascript" src="${base}/frame/layui/layui.all.js"></script>
    <script type="text/javascript" src="${base}/frame/layui/layui.js"></script>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="Free HTML5 Template by FreeHTML5.co" />
    <meta name="keywords" content="free html5, free template, free bootstrap, html5, css3, mobile first, responsive" />
    <!-- Facebook and Twitter integration -->
    <meta property="og:title" content=""/>
    <meta property="og:image" content=""/>
    <meta property="og:url" content=""/>
    <meta property="og:site_name" content=""/>
    <meta property="og:description" content=""/>
    <meta name="twitter:title" content="" />
    <meta name="twitter:image" content="" />
    <meta name="twitter:url" content="" />
    <meta name="twitter:card" content="" />

    <!-- Place favicon.ico and apple-touch-icon.png in the root directory -->
    <link rel="shortcut icon" href="favicon.ico">

    <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,300' rel='stylesheet' type='text/css'>

    <link rel="stylesheet" href="${base}/backstage/login/css/bootstrap.min.css">
    <link rel="stylesheet" href="${base}/backstage/login/css/animate.css">
    <link rel="stylesheet" href="${base}/backstage/login/css/style.css">


    <!-- Modernizr JS -->
    <script src="${base}/backstage/login/js/modernizr-2.6.2.min.js"></script>
    <!-- FOR IE9 below -->
    <!--[if lt IE 9]>
    <script src="${base}/backstage/login/js/respond.min.js"></script>
    <![endif]-->

</head>
<body class="style-3">
<div class="container">
    <div class="row">
        <div class="col-md-12 text-center">
            <ul class="menu">
            <#--<li><a href="index.html">Style 1</a></li>-->
            <#--<li><a href="index2.html">Style 2</a></li>-->
            <#--<li class="active"><a href="index3.html">Style 3</a></li>-->
            </ul>
        </div>
    </div>
    <div class="row">
        <div class="col-md-4 col-md-push-8">


            <!-- Start Sign In Form -->
            <form action="#" class="fh5co-form animate-box" data-animate-effect="fadeInRight" style="padding-bottom: 10px;position: relative;top: 200px;">
                <h2>欢迎登陆XXX系统</h2>
                <div class="form-group">
                    <label for="username" class="sr-only">Username</label>
                    <input type="text" class="form-control" id="phone" placeholder="请输入手机号...." autocomplete="off">
                </div>

                <div class="form-group">
                    <input type="text" id="code"  placeholder="请输入验证码" class="login_txtbx" style="width: 170px;">
                    <input id="btn" type="button" value="获取验证码"  style="color: #16a085; border: 1px solid #16a085; width: 95.5px; height: 40px;"/>
                </div>
                <#--<div class="form-group">-->
                    <#--<label for="remember"><input type="checkbox" id="remember">Remember Me</label>-->
                <#--</div>-->
            <#--<div class="form-group">-->
            <#--<p>Not registered? <a href="sign-up3.html">Sign Up</a> | <a href="forgot3.html">Forgot Password?</a></p>-->
            <#--</div>-->
                <div class="form-group">
                    <input type="button" id="login" value="Sign In" class="btn btn-primary">
                </div>
            </form>
            <!-- END Sign In Form -->


        </div>
    </div>
<#--<div class="row" style="padding-top: 60px; clear: both;">-->
<#--<div class="col-md-12 text-center"><p><small>&copy; All Rights Reserved. More Templates <a href="http://www.cssmoban.com/" target="_blank" title="模板之家">模板之家</a> - Collect from <a href="http://www.cssmoban.com/" title="网页模板" target="_blank">网页模板</a></small></p></div>-->
<#--</div>-->
</div>

<!-- jQuery -->
<script src="${base}/backstage/login/js/jquery.min.js"></script>
<!-- Bootstrap -->
<script src="${base}/backstage/login/js/bootstrap.min.js"></script>
<!-- Placeholder -->
<script src="${base}/backstage/login/js/jquery.placeholder.min.js"></script>
<!-- Waypoints -->
<script src="${base}/backstage/login/js/jquery.waypoints.min.js"></script>
<!-- Main JS -->
<script src="${base}/backstage/login/js/main.js"></script>
<script>
    $('#login').on('click',function () {
        //判断用户输入的是否为空 为空就提示用户名不能为空
        if($("#username").val()==""){
            layer.msg("用户名不能为空");
            return;
        }
        //判断用户输入的是否为空 为空就提示密码不能为空
        if($("#password").val()==""){
            layer.msg("密码不能为空");
            return;
        }
        $.ajax({
            type:"POST",
            url:"${base}/admin/land",
            data:{userName: $("#username").val(), passWord: $("#password").val()},
            success:function (data) {
                //alert(JSON.stringify(data))
                if(data.code==0){
                    layer.msg("😋&nbsp;&nbsp;&nbsp;登陆成功....")
                    setTimeout(function(){
                        //登陆成功  返回首页页面
                        window.location.href="${base}/admin/index.html";
                    },300)
                }else{
                    layer.msg("💀&nbsp;&nbsp;&nbsp;登录失败,用户名或密码错误");
                }
            }
        });
    });
    //键盘事件
    $("body").bind("keydown",function(e){
        // 兼容FF和IE和Opera
        var theEvent = e || window.event;
        var code = theEvent.keyCode || theEvent.which || theEvent.charCode;
        if (code == 13) {
            //回车执行查询
            $("#login").click();
        }
    });
</script>
</body>
</html>

